import { useState } from "react"
import { Material } from "../material"
import { Editor } from "../editor"
import { Config } from "../config"

import { PageContext } from "../../store"

export const Main = () => {
  const [ list, setList ] = useState([])
  const [ currentConfigId, setCurrentConfigId ] = useState(null)

  return (
    <div style={{display: 'flex'}}>
      <PageContext.Provider value={{
        list,
        setList,
        currentConfigId,
        setCurrentConfigId
      }}>
        <Material></Material>
        <Editor></Editor>
        <Config></Config>
      </PageContext.Provider>
    </div>
  )
}